<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue 测试实例 - 菜鸟教程(runoob.com)</title>
<script src="https://cdn.staticfile.org/vue/3.2.36/vue.global.min.js"></script>
</head>

<body>
<div id="hello-vue" class="demo">

  <yf v-for="sit in sites" :id='sit.id' :site='sit.site'></yf>
</div>

<script>

const site ={
  data(){
    return {
      sites:[
        {id:1,site:'nsu'},
        {id:2,site:'cdu'},
        {id:3,site:'swu'},
      ]
    }
  }
}

const app =  Vue.createApp(site)

app.component('yf',{
  props:['id','site'],
  template:'<h1>{{id}}-{{site}}</h1>'
}

)

app.mount('#hello-vue')

</script>
</body>
</html>
